import request from '@/utils/request'

// 查询项目组成员列表
export function reqProjectTeamMemberList(params) {
  return request({
    url: '/task/taskGroupMember/listing',
    method: 'get',
    params: params
  })
}

// 新增项目组成员
export function reqAddProjectTeamMember(data) {
  return request({
    url: '/task/taskGroupMember/add',
    method: 'post',
    data: data
  })
}

// 修改项目组成员
export function reqEditProjectTeamMember(data) {
  return request({
    url: '/task/taskGroupMember/edit',
    method: 'post',
    data: data
  })
}

// 删除项目组成员
export function reqDeleteProjectTeamMember(taskGroupMemberIds) {
  let ids = taskGroupMemberIds
  if (taskGroupMemberIds instanceof Array) {
    ids = taskGroupMemberIds.join(',')
  }
  return request({
    url: `/task/taskGroupMember/remove/${ids}`,
    method: 'delete'
  })
}